package com.java.admin.message.controller;

import com.java.admin.message.service.MessageService;
import com.java.database.entity.PagingEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MessageController {

    @Autowired
    private MessageService messageService;
    /**
     * 分页查询所有留言信息
     */
    @ResponseBody
    @RequestMapping("/queryAllMessage")
    public PagingEntity queryAllMessage(String pageNo,String like){
        PagingEntity pagingEntity = messageService.queryAllMessage(pageNo,like);

        return pagingEntity;
    }
}
